﻿using AutoMapper;
using BCDto.OA.WorkflowActive.WorkflowActive;
using BCDto.OA.WorkflowActive.WorkflowActivity;
using BCDto.OA.WorkflowActive.WorkflowActivityStep;
using BCDto.OA.WorkflowActive.WorkflowActivityStepFormConfig;
using BCDto.OA.WorkflowActive.WorkflowActivityStepFormItem;
using BCDto.OA.WorkflowActive.WorkflowActivityStepReviewer;
using BCDto.OA.WorkflowActive.WorkflowActivityStepSpecificFormItem;
using BCEntity.OA.WorkflowActive.WorkflowActive;
using BCEntity.OA.WorkflowActive.WorkflowActivity;
using BCEntity.OA.WorkflowActive.WorkflowActivityStep;
using BCEntity.OA.WorkflowActive.WorkflowActivityStepFormConfig;
using BCEntity.OA.WorkflowActive.WorkflowActivityStepFormItem;
using BCEntity.OA.WorkflowActive.WorkflowActivityStepReviewer;
using BCEntity.OA.WorkflowActive.WorkflowActivityStepSpecificFormItem;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCWorkflowEngine.MapperProfiles
{
    public class OAWorkflowActivityProfile : Profile
    {
        public OAWorkflowActivityProfile()
        {
            //工作流活动
            CreateMap<WorkflowActivityDto, WorkflowActivityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityRequestDto, WorkflowActivityPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityRequestDto, WorkflowActivityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityPutDto, WorkflowActivityEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityEntity, WorkflowActivityDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityViewEntity, WorkflowActivityViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            
            //工作流模板步骤
            CreateMap<WorkflowActivityStepDto, WorkflowActivityStepEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepRequestDto, WorkflowActivityStepPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepRequestDto, WorkflowActivityStepEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepPutDto, WorkflowActivityStepEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepEntity, WorkflowActivityStepDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepButtonConditionPutDto, WorkflowActivityStepEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            
            //工作流活动步骤审核人
            CreateMap<WorkflowActivityStepReviewerDto, WorkflowActivityStepReviewerEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepReviewerRequestDto, WorkflowActivityStepReviewerPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepReviewerRequestDto, WorkflowActivityStepReviewerEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepReviewerPutDto, WorkflowActivityStepReviewerEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepReviewerEntity, WorkflowActivityStepReviewerDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //工作流活动步骤表单配置
            CreateMap<WorkflowActivityStepFormConfigDto, WorkflowActivityStepFormConfigEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepFormConfigRequestDto, WorkflowActivityStepFormConfigPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepFormConfigRequestDto, WorkflowActivityStepFormConfigEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepFormConfigPutDto, WorkflowActivityStepFormConfigEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepFormConfigEntity, WorkflowActivityStepFormConfigDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //工作流活动步骤表单项
            CreateMap<WorkflowActivityStepFormItemDto, WorkflowActivityStepFormItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepFormItemRequestDto, WorkflowActivityStepFormItemPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepFormItemRequestDto, WorkflowActivityStepFormItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepFormItemPutDto, WorkflowActivityStepFormItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepFormItemEntity, WorkflowActivityStepFormItemDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //工作流活动特殊表单项
            CreateMap<WorkflowActivityStepSpecificFormItemDto, WorkflowActivityStepSpecificFormItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepSpecificFormItemRequestDto, WorkflowActivityStepSpecificFormItemPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepSpecificFormItemRequestDto, WorkflowActivityStepSpecificFormItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepSpecificFormItemPutDto, WorkflowActivityStepSpecificFormItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkflowActivityStepSpecificFormItemEntity, WorkflowActivityStepSpecificFormItemDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

        }
    }
}
